import { createRouter, createWebHistory,createWebHashHistory, RouteRecordRaw } from 'vue-router';
import Home from '@/view/home.vue';
import Index from '@/view/index.vue';
import Detail from '@/view/detail.vue';
// import CardPass from '@/view/cardPass.vue';
// import Pay from '@/view/pay.vue';
// import CardBuy from '@/view/cardBuy.vue'
const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'index',
        component: Index,
        props: route => ({ cdk: route.query.cdk })
    },
    {
        path: '/detail',
        name: 'detail',
        component: Detail,
        props: route => ({ cdk: route.query.cdk })
    },
    // {
    //     path: '/cardpass',
    //     name: 'cardpass',
    //     component: CardPass
    // },
    // {
    //     path: '/pay',
    //     name: 'pay',
    //     component: Pay,
    //     props: route => ({ cdk: route.query.cdk })
    // },
    // {
    //     path: '/cardbuy',
    //     name: 'cardbuy',
    //     component: CardBuy
    // },
]


const router = createRouter({
    history: createWebHistory(),
    routes
})


export default router